@extends('home.index.layout')
@section('fen')
<!-- 头部 -->
        <div class="header clearfix">
            <div class="wrap">
                <div class="logo" style="">
               
                    <a href="{{url('/')}}"></a>
                </div>
 <!--搜索 开始-->
                <div class="search" style="position:relative;">
                    <div class="search-bar clearfix">
                        <input id="keyword" name="keyword" class="search-input" value="输入商品名／编号／拼音" onfocus=" if (this.value == '输入商品名／编号／拼音') {this.value = '';this.style.color = '#000';} " onblur=" if (this.value == '') {this.value = '输入商品名／编号／拼音';this.style.color = '#999';} " style="color: rgb(153, 153, 153);" type="text">
                        <input class="search-btn" value="搜索" type="submit">
                    </div>
                    <ul class="hide" id="shelper" style="display: none;"></ul>
                    <div class="search-keywords" id="keywords">
                            <a href="#" target="_blank">大闸蟹</a>
                            <a href="#" class="hot" target="_blank">蓝莓</a>
                            <a href="#" target="_blank">阿克苏</a>
                            <a href="#" class="hot" target="_blank">易果俱乐部</a>
                            <a href="#" class="hot" target="_blank">奇异果</a>
                        </div>
                </div>
                <!--购物车 开始-->
<div class="shopping-cart">
    <dl>
        <dt class="shopping-btn"><a href="{{url('/cart/index')}}"> <span class="totleNum"><b>{{session('total_Number') ? session('total_Number') : '0'}}</b></span><b class="totlePrice">{{session('total_Money') ? session('total_Money') : '0.0'}}</b></a></dt>
        <dd class="shopping-list">
            <div class="spacer"></div>
            @if(session('goods_list'))
            <div class="goods" style="">
                <p id="deliveryType" style=""></p>
                <ul>
                        @foreach(session('goods_list') as $u)
                        <li><div class="l"><a href="{{url('/detail')/$u['gid']}}" target="_blank"><img src="{{url('/uploads/gPhoto')}}/{{$u['pic'] or 'default.jpg'}}" width="42" height="42"></a></div><div class="c"><a href="{{url('/detail')/$u['gid']}}">{{$u['gname']}}</a></div><div class="r"><b>¥{{$u['gprice']}}</b> * {{$u['count']}}<a href="javascript:;" onclick="">删除</a></div></li>
                            
                        @endforeach
                </ul>
                <div class="price-total">
                    <div><span class="totleNum">共<b>{{session('total_Number') ? session('total_Number') : '0'}}</b>件商品</span><span>共计<b class="totlePrice">{{session('total_Money') ? session('total_Money') : '0.0'}}</b></span></div>
                    <div><a href="{{url('/cart/index')}}" class="settleup">去购物车</a></div>
                </div>
            </div>
            @else
            <div class="nogoods" style="">
                购物车中还没有商品，赶紧选购吧！{{-- dd(session('goods_list')) --}}
            </div>
            @endif
        </dd>
    </dl>
</div>
                <!--购物车 结束-->
            </div>
        </div>



@endsection

@section('content')
    <div class="wrap">
    <!--排序-->
    <div id="formCx" class="filter clearfix">
        <div class="filter_sort">
            <a class="on" href="javascript:;" _sort="0">默认排序</a>    
        </div>
    </div>
    <div class="filter_space"></div>
    <!--商品列表-->
    <div class="goods_list clearfix" _category="0109_pingguo" _page="2" _end="false" _maxpage="2">
            <ul>
                       <!-- {{$i = 0}} -->
                    @foreach($shop as $s)    
                    <li class="product_item j_product current" _type="0" _productid="1102721">
                        <div class="p_img clearfix">

                            <a href="{{url('detail')}}/{{$s -> gid}}" target="_blank">
                                    <img src="{{url('/uploads/gPhoto')}}/{{$imgs[$i]}}" width="290" height="290" class="j_product_img">

                            </a>
                        </div>
                        <div class="p_info clearfix">
                            <div class="p_name"><a href="{{url('detail')}}/{{$s -> gid}}" target="_blank">{{$s -> gname}}</a></div>
                            <div class="p_price">
                                <span class="price">
                                    <strong>¥{{$s -> gprice}}</strong>
                                </span>
                            </div>
                        </div>
                        <div class="p-buy">
                            <span>“浪漫之果”，甜蜜不容错过。</span>

                                        <a class="btn-buy" href="javascript:;" onclick="G.app.cart.module.addToCart(this,&#39;1102721&#39;,1,app.referCart);">加入购物车</a>
                        </div>
                    </li>
                    <!-- {{$i++}} -->
                   @endforeach
                    
        </ul>
    </div>
</div>  
@endsection